CCC	THIS IS A SHORT SAMPLE PROGRAM THAT YOU MAY
CCC	WANT TO READ OVER AND EXECUTE.
CCC	
CCC	THE PROGRAM READS REAL NUMBERS FROM THE
CCC	CONSOLE USING FREE FORMAT I/O AND PRINTS THE
CCC	NUMBER READ AS WELL AS ITS INVERSETO THE CONSOLE. 
CCC	IF AN ENTRY ERROR OCCURRS DURING READING THE NUMBER,
CCC	THE PROGRAM TRYS AGAIN. AT MOST 10 VALID NUMBERS ARE READ.



	do 10 i=1,10

ccc	use free format output to write a message to console,
ccc	use $ option to termainate format so carriage return
ccc	is not done automatically at end of format. (note that
ccc	free format OUTPUT applies only to SSS Fortran character
ccc	strings with A format code).

1000	write(1,100)"input a real number:"
100	format(/,' ',a0 $)

ccc	read a real number with free format using Fortran G format.
ccc	note that free format INPUT applies to ANY data type or 
ccc	Fortran format code. If any error occurs during reading,
ccc	trap to statement number 1000.

	read(1,200,errexit=2000)realn
200	format(g0.0)

ccc	write real number, and inverse of number to console using E
ccc	format code.

	write(1,300)realn,1.0/realn
300	format(' number is: ',e15.7 / ' inverse is:',e15.7)
10	continue

	stop

ccc	note that if you input a zero, (or just hit ENTER which in
ccc	free format input results in zero), 1.0/0.0 will give a
ccc	divide by zero. on output the filed will be filled with +'s
ccc	indicating the value +infinity, a valid value in IEEE number
ccc	format used by SSS Fortran. -'s are used for -infinity and
ccc	?'s are used for NaN in formatted output. Although a program
ccc	that is working correctly and receiving valid input will
ccc	not normally encounter these special values, you may wish
ccc	to consult a reference on proposed IEEE floating point format
ccc	for more information. Note that the zerodivide error message
ccc	could be suppressed by masking this error with the SSS Fortran
ccc	library routines IGTERR and SETERR, described in Fortran user's
ccc	manual. Also if you want to see what an end of file error
ccc	message looks like, respond to input statement with control Z
ccc	followed by ENTER. control Z is the standard end of file indicator
ccc	for ASCII files. this error could also be trapped with the
ccc	ENDFILE option in the read statement.

2000	write(1,400)
400	format(/,' INVALID INPUT, try again.')
	goto 1000

	end
CC	THIS IS A SHORT SAMPLE PROGRAM THAT YOU MAY
CCC	WANT TO READ OVER AND EXECUTE.
CCC	
CCC	THE PROGRAM READS REAL NUMBERS FR